#ifndef XFB_ARRAY_H_
#define XFB_ARRAY_H_

#include <stddef.h>

#include "xfb_vector.h"

typedef struct xf_array {
  xf_vector_t v;
  void **items;
  size_t sz;
} xf_array_t;

/* access methods */
#define xf_array_size(a) ((a)->sz)
#define xf_array_data(a) ((a)->items)
#define xf_array_index(a, index) ((a)->items[index])

/* funciton */
void xf_array_init(xf_array_t *a);
void xf_array_destory(xf_array_t *a);

void xf_array_push(xf_array_t *a, void *item);
void *xf_array_pop(xf_array_t *a);

#endif  // XFB_ARRAY_H_
